home *** CD-ROM | disk | FTP | other *** search
/ Merciful 4 / Merciful - Disc 4.iso / rexx / vectorfontpath.pprx < prev    next >
Text File  |  1996-11-01  |  3KB  |  109 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1996 Cloanto Italia srl */
  2.  
  3. /* $VER: VectorFontPath.pprx 1.0 */
  4.  
  5. /** ENG
  6.  This script selects the directory path used by macros working with
  7.  vector fonts, such as "Vector Text" and "Text Whirlpool".
  8.  
  9.  The selected path must contain files with names ending with ".otag".
  10.  
  11.  By default, the Amiga uses vector fonts in the Compugraphic file format.
  12.  Non-Amiga Compugraphic fonts can be installed using the Intellifont
  13.  tool which is part of the operating system. Other types of fonts, such
  14.  as Adobe Type 1 fonts, can also be used, if the appropriate libraries
  15.  have been installed. Digita's Wordworth package, for example, includes
  16.  such fonts and libraries. The path for Wordworth fonts, which can be
  17.  selected with this script, is "Wordworth:WwFonts/UFST".
  18. */
  19.  
  20. /** DEU
  21.  Dieses Skript dient zur Auswahl des Verzeichnispfads für Makros,
  22.  zu deren Ausführung Vektorschriften erforderlich sind, z.B.
  23.  "VektorText" und "Text Whirlpool".
  24.  
  25.  Unter dem ausgewählten Pfad müssen Dateien gespeichert sein, deren
  26.  Namen die Endung ".otag" aufweist.
  27.  
  28.  Der Amiga verwendet standardmäßig Vektorschriften im sog. "Compugraphic"-Format.
  29.  Nicht im Amiga-Format vorliegende Compugraphic-Fonts lassen sich mit Hilfe
  30.  des Hilfsprogramms Intellifont installieren, welches Bestandteil der
  31.  Amiga-Systemsoftware ist. Vorausgesetzt, daß die entsprechenden Libraries
  32.  vorhanden sind, lassen sich auch andere Fontformate (z.B. Adobe Typ 1)
  33.  einsetzen. Diese Libraries (und dazugehörige Fonts) befinden sich z.B. im
  34.  Lieferumfang der Textverarbeitung Wordworth von Digita. Der mit diesem
  35.  Skript einzustellende Pfad zu den Wordworth-Fonts würde z.B. folgendermaßen
  36.  aussehen: "Wordworth:WwFonts/UFST".
  37. */
  38.  
  39. IF ARG(1, EXISTS) THEN
  40.     PARSE ARG PPPORT
  41. ELSE
  42.     PPPORT = 'PPAINT'
  43.  
  44. IF ~SHOW('P', PPPORT) THEN DO
  45.     IF EXISTS('PPaint:PPaint') THEN DO
  46.         ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
  47.         DO 30 WHILE ~SHOW('P',PPPORT)
  48.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  49.         END
  50.     END
  51.     ELSE DO
  52.         SAY "Personal Paint could not be loaded."
  53.         EXIT 10
  54.     END
  55. END
  56.  
  57. IF ~SHOW('P', PPPORT) THEN DO
  58.     SAY 'Personal Paint Rexx port could not be opened'
  59.     EXIT 10
  60. END
  61.  
  62. ADDRESS VALUE PPPORT
  63. OPTIONS RESULTS
  64. OPTIONS FAILAT 10000
  65.  
  66. Get 'LANG'
  67. IF RESULT = 1 THEN DO        /* Deutsch */
  68.     req_title         = 'Pfad für Vektorfonts auswählen'
  69.     txt_err_oldclient = 'Für dieses Skript_ist eine neuere Version_von Personal Paint erforderlich'
  70. END
  71. ELSE IF RESULT = 2 THEN DO    /* Italiano */
  72.     req_title         = 'Percorso font vettoriali'
  73.     txt_err_oldclient = 'Questa procedura richiede_una versione più recente_di Personal Paint'
  74. END
  75. ELSE DO                /* English */
  76.     req_title         = 'Select the vector font path'
  77.     txt_err_oldclient = 'This script requires a newer_version of Personal Paint'
  78. END
  79.  
  80. Version 'REXX'
  81. IF RESULT < 7 THEN DO
  82.     RequestNotify 'PROMPT "'txt_err_oldclient'"'
  83.     EXIT 10
  84. END
  85.  
  86. set_fname  = 'ENV:PP_VectorPath'
  87. list_fname = 'ENV:PP_VectorFonts'
  88.  
  89.  
  90. LockGUI
  91. IF OPEN('settingfile', set_fname, 'R') THEN DO
  92.     spath = READCH('settingfile', 65535)
  93.     CALL CLOSE('settingfile')
  94. END
  95. ELSE spath = 'FONTS:'
  96.  
  97. RequestPath '"'req_title'" "'spath'"'
  98. IF RC = 0 THEN DO
  99.     PARSE VALUE RESULT WITH '"' path '"'
  100.     IF OPEN('settingfile', set_fname, 'W') THEN DO
  101.         WRITECH('settingfile', path)
  102.         CALL CLOSE('settingfile')
  103.  
  104.         IF spath ~= path THEN
  105.             ADDRESS COMMAND 'Delete >NIL: "'list_fname'"'
  106.     END
  107. END
  108. UnlockGUI
  109.